﻿<Common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Antares.VIEWs.TimelineDayPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Antares.VIEWs"
    xmlns:common="using:Antares.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Common="using:AntaresShell.Common" xmlns:Converters="using:Antares.Converters" mc:Ignorable="d">
    <Common:LayoutAwarePage.Transitions>
        <TransitionCollection>
            <ContentThemeTransition HorizontalOffset="300"/>
        </TransitionCollection>
    </Common:LayoutAwarePage.Transitions>
    <Common:LayoutAwarePage.Resources>
        <Converters:IntToTimeConverter x:Key="IntToTimeConverter"/>
    </Common:LayoutAwarePage.Resources>
    <Grid x:Name="RootGrid" Background="#f1f6fa">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="120"/>
            <ColumnDefinition Width="580*"/>
            <ColumnDefinition Width="43*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="31*"/>
            <RowDefinition Height="339*"/>
            <RowDefinition Height="20*"/>
            <RowDefinition Height="207*"/>
            <RowDefinition Height="23*"/>
        </Grid.RowDefinitions>
        <!--<Image Stretch="Fill" Opacity="0.25" Grid.Row="0" Grid.RowSpan="6" Source="../Assets/Timeline-Recovered.png" Grid.ColumnSpan="3"/>-->
        <Grid Grid.ColumnSpan="3" Background="White">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Text="Timeline day" Style="{StaticResource PageHeaderTextStyle}" Grid.Column="1" IsHitTestVisible="false"/>
        </Grid>

        <!--Background="{StaticResource DayViewBackground}"-->
        <Grid Grid.Column="0"
              Grid.ColumnSpan="3"
              Grid.Row="2">
            <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="66*"/>
                    <ColumnDefinition Width="1216*"/>
                    <ColumnDefinition Width="84*"/>
                </Grid.ColumnDefinitions>
            <Border BorderBrush="#b9b9b9"
                    BorderThickness="1"
                    Grid.Column="1"
                    />
            <Image Stretch="Fill" Grid.Column="1" x:Name="WeatherBackground" Opacity="1"/>
            <Border BorderBrush="#b9b9b9"
                    BorderThickness="1"
                    Grid.Column="1"
                    />
            <ScrollViewer Grid.Column="1"
                          x:Name="TimeScrollViewer"
                          Margin="0,10,0,-15"
                          VerticalScrollMode="Disabled"
                          VerticalScrollBarVisibility="Hidden"
                          HorizontalScrollMode="Enabled"
                          HorizontalScrollBarVisibility="Auto"
                          ZoomMode="Disabled">
                <Grid x:Name="TimeGrid"
                      Margin="0,0,0,25"
                      Loaded="TimeGrid_Loaded">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="80"/>
                        <RowDefinition Height="38"/>
                    </Grid.RowDefinitions>
                    <StackPanel
                                Orientation="Horizontal"
                                Grid.Row="1"
                                Grid.RowSpan="2" 
                                Grid.ColumnSpan="1">
                        <Image Source="../Assets/LinesTime_03.png" 
                           VerticalAlignment="Bottom"
                           Margin="30,0,30,0"
                           HorizontalAlignment="Left"
                           Stretch="None"/>
                    </StackPanel>
                </Grid>
            </ScrollViewer>
        </Grid>
        
        <Grid x:Name="DetailGrid"
              Grid.Column="0"
              Grid.ColumnSpan="3"
              Grid.Row="4" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="66*" />
                <ColumnDefinition Width="1218*" />
                <ColumnDefinition Width="84*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border Grid.Column="1"
                    Grid.Row="0"
                    Grid.RowSpan="3"
                    BorderBrush="#b9b9b9"
                    BorderThickness="1"/>
            <Rectangle StrokeThickness="1" Stroke="#b9b9b9"  Grid.Column="1" Grid.Row="0" Grid.RowSpan="3" Fill="#e3e3e3"  />
            <Grid Grid.Column="1" Grid.Row="0" Grid.RowSpan="3">
                <Grid.RowDefinitions>
                    <RowDefinition Height="5"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="45"/>
                    <RowDefinition Height="2.6*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="15"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="15"/>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="1" Grid.Row="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Rectangle  Fill="White" VerticalAlignment="Bottom" Height="1" Margin="0,1,0,0" Grid.Column="1" />
                    <Rectangle  Fill="#bdbdbd" VerticalAlignment="Bottom" Height="1"  Grid.Column="1" />
                    <Rectangle  Fill="#bdbdbd" VerticalAlignment="Top" Height="1" Grid.Column="1"  />
                    
                    <StackPanel 
                        Orientation="Horizontal"
                         VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        Grid.Column="1" >
                         <TextBlock x:Name="TaskStart" 
                           Margin="0,0,10,0"
                           Text="{Binding Resource[Timeline_StartTime]}"  
                           FontSize="20"
                                   FontWeight="SemiLight"
                           VerticalAlignment="Center" 
                           Foreground="#5b5a62"/>
                        <Image x:Name="TimeIcon" Source="../Assets/TimeIcon.png" Margin="0,3,0,3" Grid.Column="0" />

                        <TextBlock x:Name="TaskEnd" 
                           Text="{Binding Resource[Timeline_EndTime]}"  
                           Margin="10,0,0,0"
                           FontSize="20"
                           FontWeight="SemiLight"
                           VerticalAlignment="Center" 
                           Foreground="#5b5a62"/>
                    </StackPanel>
                </Grid>
                
            <TextBlock x:Name="TaskTitle" 
                       HorizontalAlignment="Center"
                       Text="{Binding Resource[Timeline_YourTask]}"
                       Margin="0,0,0,5"
                       FontSize="40"
                       Foreground="#383759"
                       FontWeight="Light"
                      
                       Grid.Column="1"
                       Grid.Row="1"/>
            
            
            <TextBlock x:Name="TaskDetail" 
                       Grid.Column="1"
                       Text="{Binding Resource[Timeline_Description]}"
                       HorizontalAlignment="Center"
                       Margin="0,5,0,0"
                       FontFamily="Calibri"
                       FontWeight="SemiLight"
                       TextWrapping="Wrap"
                       TextTrimming="WordEllipsis"
                       FontSize="20"
                       VerticalAlignment="Top"
                       Foreground="#5b5a62"
                       Grid.Row="3" />
            </Grid>
        </Grid>
    </Grid>
</Common:LayoutAwarePage>